﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PaperRenderingInterfaces;
using System.ComponentModel.Composition;
using DeepZoomPivotConstructor.PivotLib;
using HtmlAgilityPack;
using PaperPluginUtilities;

namespace HTMLPageScanners
{
    /// <summary>
    /// Take an HTML page, and look for all links to html pages below it - that are on the same web site. Use the table
    /// scanner to look for images below that.
    /// </summary>
    [Export(typeof(IPaperRender))]
    [PaperRender("MasterHTMLRenderHTMLOnlyBelow")]
    public class MasterHTMLOnlyBelow : IPaperRender
    {
        /// <summary>
        /// So we can do the rendering of the notes we find.
        /// </summary>
#pragma warning disable 0649
        [Import]
        IPaperRenderEngine MyPaperRenderEngine;
#pragma warning restore 0649

        public IEnumerable<PivotImage> Render(string renderAddress)
        {
            return MyPaperRenderEngine.Render("MasterHTMLRenderHTMLAndFurther", "/UseTopPage=false,PlotPageScanner=HTMLSimpleTableCells/" + renderAddress);
        }
    }
}
